﻿using Microsoft.Extensions.Logging;
using NetLogExtend.Log4Net;
using NLog.Web;

namespace NetCoreStudy.LogConfig
{
    /// <summary>
    /// 
    /// </summary>
    public static class Log4Build
    {

        public static WebApplicationBuilder Log4Config(this WebApplicationBuilder builder)
        {

            var log = new CustomConsoleLoggerConfiguration
            {
                LogLevel = LogLevel.Debug,
                EventId = 0
            };

            builder.Logging.AddProvider(new Log4Provider(log));

            return builder;
        }

    }
}
